package com.Java.train.common.utils;

import cn.hutool.core.util.IdUtil;

public class SnowFlakeUtil {
    private static long workId = 1;
    private static long dataCenterId = 1;

    public static long getSnowFlakeNextId() {
        return IdUtil.getSnowflake(workId, dataCenterId).nextId();
    }

    public static String getStrSnowFlakeNextId() {
        return String.valueOf(IdUtil.getSnowflake(workId, dataCenterId).nextId());
    }
}
